﻿using UnityEngine;
using System.Collections;

public class ClickBox : MonoBehaviour {

	public GameManager_2 gameManager_2;
	int number;
	int count;
	private bool checkInit = false;
	// Use this for initialization
	void Start () {
		number = int.Parse(gameObject.name.Remove(0,7));
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	public void OnEnter()
	{
		count = gameManager_2.InitBox (number);
	}

	public void OnExit()
	{
		/*if (checkInit == false) 
		{
			Debug.Log (gameManager_2.listGroupSquare.Count);
			for (int i = 0; i < gameManager_2.listBoxChoose.Count; i++) {
				gameManager_2.listGroupSquare.Remove (gameManager_2.listGroupSquare[gameManager_2.listBoxChoose.Count - 1]);
			}
			checkInit = true;
			Debug.Log ("A: " + gameManager_2.listBoxChoose.Count);
		}*/
	}

	public void OnDown()
	{
		checkInit = true;
	}

	public void OnUp()
	{
		
	}
}
